<template>
  <div class="services-container">
    <h2 class="section-title">我们的专业服务</h2>
    <el-row :gutter="20">
      <el-col
          v-for="(service, index) in services"
          :key="index"
          :xs="24" :sm="12" :md="8" :lg="6"
      >
        <el-card class="service-card" shadow="hover">
          <div class="service-icon">
            <el-icon :size="36"><component :is="service.icon" /></el-icon>
          </div>
          <h3>{{ service.title }}</h3>
          <el-collapse>
            <el-collapse-item title="查看详情">
              <ul class="service-items">
                <li v-for="(item, i) in service.items" :key="i">{{ item }}</li>
              </ul>
            </el-collapse-item>
          </el-collapse>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import {
  Film,
  Microphone,
  MagicStick,
  Lightning,
  Connection
} from '@element-plus/icons-vue'

const services = [
  {
    title: '影视内容制作',
    icon: Film,
    items: [
      '影视剧开发（电影/电视剧/网剧）',
      '企业宣传片与专题片',
      '微电影与短视频定制',
      '商业广告制作'
    ]
  },
  {
    title: '活动与演出服务',
    icon: Microphone,
    items: [
      '大型活动拍摄与直播',
      '文艺演出策划执行',
      '明星经纪与演出代理',
      '粉丝见面会组织'
    ]
  },
  {
    title: '技术支持服务',
    icon: MagicStick,
    items: [
      '专业设备租赁',
      '后期制作全流程',
      'VR/AR虚拟制作',
      '三维动画特效'
    ]
  },
  {
    title: '创意策划服务',
    icon: Lightning,
    items: [
      '影视项目全案策划',
      '品牌整合营销',
      '文化IP开发运营',
      '社交媒体内容策划'
    ]
  },
  {
    title: '衍生服务',
    icon: Connection,
    items: [
      '影视专业培训',
      '影棚场地租赁',
      '版权法律咨询',
      '沉浸式体验开发'
    ]
  }
]
</script>

<style scoped>
.services-container {
  padding: 40px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 28px;
  color: #333;
}

.service-card {
  margin-bottom: 20px;
  height: 100%;
  transition: transform 0.3s;
  border-radius: 12px;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-icon {
  text-align: center;
  margin: 20px 0;
  color: var(--el-color-primary);
}

.service-card h3 {
  text-align: center;
  margin-bottom: 15px;
  font-size: 18px;
}

.service-items {
  padding-left: 20px;
  color: #666;
  list-style-type: disc;
}

.service-items li {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

/* 移动端适配样式 */
@media screen and (max-width: 768px) {
  .services-container {
    padding: 20px 10px;
  }

  .section-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .el-row {
    margin-left: -5px !important;
    margin-right: -5px !important;
  }

  .el-col {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  .service-card {
    margin-bottom: 10px;
    padding: 10px;
  }

  .service-icon {
    margin: 10px 0;
  }

  .service-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .service-items li {
    font-size: 12px;
  }

  /* 确保折叠面板在移动端显示良好 */
  :deep(.el-collapse-item__header) {
    font-size: 14px;
    padding: 0 10px;
  }

  :deep(.el-collapse-item__content) {
    padding: 10px;
  }
}

/* 超小屏幕适配 */
@media screen and (max-width: 480px) {
  .service-icon .el-icon {
    font-size: 28px;
  }

  .service-card h3 {
    font-size: 15px;
  }

  .service-items li {
    font-size: 11px;
  }
}
</style>
